﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="/static/css/angularStyle.css" />
    <link rel="stylesheet" href="/static/css/common/reset.css" />
    <link rel="stylesheet" href="/static/css/community.css" />
    <link rel="stylesheet" href="/static/css/ng-pagination.min.css" />
    <link rel="stylesheet" href="/static/css/sweetalert.min.css" />
    <title>宾果高校</title>
</head>
<body>
    <div class="community-detail" ng-app="myApp">
        <div id="divHeader"></div>
        <div ng-controller="userInfoCtrl" ng-cloak ng-model="names">
            <section class="container comDetail-info">
                <img src="{{names.LogoPath}}" class="comDe-info-img" />
                <h1 class="f14 textcenter colorWhite">{{names.Name}}</h1>
                <h3 ng-if="names.UserType == 'Student'" class="f14 textcenter colorWhite mt10">社团口号：<em>{{names.Remark}}</em></h3>
                <div class="comDetail-info-tool">
                    <h2 class="comDetail-iTool-school">{{names.UserType == 'Student' ? '已通过高校验证':'已通过企业验证'}}</h2>
                    <h2 class="comDetail-iTool-binguo">已通过宾果验证</h2>
                </div>
            </section>
            <section class="container comDetail-content clearfix">
                <div class="comDetail-content-left fl">
                    <h1>{{names.UserType == 'Student' ? '社团资料':'企业资料'}}</h1>
                    <div class="comDtail-cLeft-text">
                        <p>{{names.UserType == 'Student' ? '社团名称':'企业名称'}}： <em>{{names.Name}}</em></p>
                        <p>{{names.UserType == 'Student' ? '社团负责人':'企业负责人'}}： <em>{{names.ChargeName}}</em></p>
                        <p>{{names.UserType == 'Student' ? '社团级别':'企业类型'}}： {{names.Nature}}</p>
                        <p ng-if="names.UserType == 'Student'">所属学校： {{names.SchoolName}}</p>
                        <p>{{names.UserType == 'Student' ? '社团类型':'行业类型'}}： {{names.Type}}</p>
                        <p ng-if="names.UserType == 'Company'">企业简介： {{names.Sign}}</p>
                        <p>{{names.UserType == 'Student' ? '社团规模':'企业规模'}}： {{names.Scale}}</p>
                        <p ng-if="names.UserType == 'Student'">部门数量： {{names.Amount}}个</p>
                        <p ng-if="names.UserType == 'Company'">企业官网： {{names.CompanyHref}}</p>
                        <!--<div class="comDetail-cleft-map">
                            <img src="/static/images/communityDetail4.png" />
                        </div>-->
                        <p>地址：{{names.Address}}</p>
                    </div>
                </div>
                <div class="comDetail-content-right fr" ng-controller="projectCtrl">
                    <h1 id="h1Name" class="comDetail-cRight-title">社团筹备</h1>
                    <div ng-repeat="x in names">
                        <ul class="comDetail-cRight-list mt15">
                            <li>
                                <div class="clearfix">
                                    <p class="fl f14">{{x.ProjectName}}</p>
                                    <p class="fl colorLGray ml100">{{x.CreateDate |date:'yyyy/MM/dd' }}发布</p>
                                    <p class="fr">活动状态：<em class="colorRed">筹备中</em></p>
                                </div>
                                <div class="clearfix mt5">
                                    <div class="fl">
                                        <p class="colorLGray comDetail-crList">{{x.StartDate | date:'yyyy/MM/dd'}}-{{x.EndDate | date:'yyyy/MM/dd' }}</p>
                                        <p class="colorLGray">
                                            <label>{{x.CreatorType == 'Company' ? '提供赞助金' : '所需赞助金'}}：<em class="colorRed">{{x.Amount}}</em></label>
                                            <label ng-if="x.CreatorType == 'Student'" class="ml20">活动地点：{{x.Address}}</label>
                                        </p>
                                    </div>
                                    <a href="/release-detail.html?id={{x.ProjectID}}" class="comDetail-crList-btn fr">详情</a>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="page">
                        <div class="pager center">
                            <pager page-count="pageCount" current-page="currentPage" on-page-change="onPageChange()" first-text="首页" next-text="下一页" prev-text="上一页" last-text="尾页"></pager>
                        </div>
                    </div>
                </div>
            </section>
        </div>

        <div id="divFooter"></div>
    </div>
    <script type="text/javascript" src="/static/js/ref/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="/static/js/self/common.js"></script>
    <script type="text/javascript" src="/static/js/ref/angular.min.js"></script>
    <script type="text/javascript" src="/static/js/ref/ng-pagination.min.js"></script>
    <script type="text/javascript" src="/static/js/ref/sweetalert.min.js"></script>
    <script>

        var param = common.getUrlArgStr();
        if (!common.checkValue(param.id) || !common.checkValue(param.type))
            window.location = "index.html";

        if (param.type == "Company")
            $("#h1Name").html("企业赞助");

        $("#divHeader").load("/wuc/header.html", function () {
            var userType = param.type == "Company" ? 1 : 2;
            CheckUser(userType);
        });

        $("#divFooter").load("/wuc/footer.html");

        var app = angular.module('myApp', ['ng-pagination']);

        var par = {};
        par.BelongID = param.id;
        par.Limit = 10;
        par.Start = 1;

        common.CreatePagingCtrl({ name: 'projectCtrl', url: '/api/project/ListProjectsByBelongID', pars: par, app: app });
        common.CreateController({ name: 'userInfoCtrl', url: '/api/user/GetUserInfo?id=' + param.id + "&type=" + param.type, objType: 'dict', app: app });

        $(function () {

            //登录框下拉
            $('.link-login').on('click', function (e) {
                var self = $(this);
                self.parent().siblings().find('a').removeClass('on');
                self.toggleClass('on');
            });
        });
    </script>
</body>
</html>
